define(function (require, exports, module) {
    var sTpl = require("modules/side-tree/index.html");
    require("modules/side-tree/index.css");
    var vueComponent = Vue.extend({
        template: sTpl,
        name: 'm-side-tree',
        template: sTpl,
        props: ['tree'],
        data: function () {
            return {};
        },
        methods: {
            nodeClick: function (node) {

                if (node.children && node.children.length > 0) {
                    node.collapsed = !node.collapsed;
                }
                if (node.url) {
                    this.$emit('abc',node);
                    return true;
                }

                return false;
            }
        },
        created: function () {

        }
    });


    Vue.component('m-side-tree', vueComponent); //都全局注册 同时exports

    module.exports = vueComponent;
});